#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>

using namespace std;

int readInt(){
	int x = 0, flg = 0;
	char ch = getchar();
	while(ch < '0' || ch > '9'){
		if(ch == '-')	flg = 1;
		ch = getchar();
	}
	while(ch >= '0' && ch <= '9'){
		x = x * 10 + (ch ^ '0');
		ch = getchar();
	}
	if(flg)
		x = - x;
	return x;
}

const int Md = 1e9 + 7;
char str[510];
int cnt[510];
int dp[510][510], dp2[510][510], dp3[510][510];
int N, K;
inline bool can(int l, int r){
	return cnt[r] == cnt[l-1];
}
inline void addMod(int& x, int y){
	x += y;
	if(x >= Md)
		x -= Md;
}
int main(){
	freopen("bracket.in", "r", stdin);
	freopen("bracket.out", "w", stdout);
	scanf("%d%d", &N, &K);
	scanf("%s", str+1);
	for(int i=1; i<=N; i++)
		cnt[i] = cnt[i-1] + (str[i] == '(' || str[i] == ')');
	for(int l=2; l<=N; l++)
		for(int i=1, j=l; j<=N; ++i, ++j){
			// dp
			if(str[i] == '*' || str[j] == '*' || str[i] == ')' || str[j] == '(')
				;
			else{
				// (...)
				if(l <= K+2 && can(i+1, j-1))
					dp[i][j] = 1;
				addMod(dp[i][j], dp[i+1][j-1]);
				for(int k=1; k<=K && k<=l-4; k++)
					if(can(i+1, i+k))
						addMod(dp[i][j], dp[i+k+1][j-1]);
					else
						break;
				for(int k=1; k<=K && k<=l-4; k++)
					if(can(j-k, j-1))
						addMod(dp[i][j], dp[i+1][j-k-1]);
					else
						break;
				dp3[i][j] = dp[i][j];
				// (...)[xxx(...)]
				for(int k=i+1; k<j; k++)
					addMod(dp[i][j], 1ll * dp3[i][k-1] * dp2[k][j] % Md);
			}
			// dp2
			for(int k=0; k<=K && k<l; k++)
				if(can(i, i+k-1))
					addMod(dp2[i][j], dp[i+k][j]);
				else
					break;
		}
	printf("%d", dp[1][N]);
	fclose(stdin);
	fclose(stdout);
	return 0;
}
